Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angle: add support for MT6816, MT6826S sensors #6735

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

nefelim4ag
Copy link
Contributor

@nefelim4ag nefelim4ag commented Nov 12, 2024

For now, this is just a proposal - till there are other real users.

MT6816 - simple 14-bit angle sensor, can be read and that's it.
MT6826S - Has calibration capabilities - implemented, hysteresis, and 15-bit output
MT6835 - (21 bit) should work with code from MT6826S, we anyway will ignore additional bits.

For now, I mostly play around with MT6826S.

Thanks.


BTW, it would be nice to have a generic query command for the angle sensor, like ACCELEROMETER_QUERY.

@KevinOConnor
Copy link
Collaborator

Thanks. As very high-level feedback, we can certainly add support for these additional sensors. The code would need to pass the regression tests though.

Cheers,
-Kevin

@nefelim4ag
Copy link
Contributor Author

nefelim4ag commented Nov 20, 2024

But for now it is failing because of image limitations:

...  ../../or1k-linux-musl/bin/ld: Klipper image is too large

The only idea that I have is to disable angle sensors for ar100.

@nefelim4ag nefelim4ag force-pushed the angle-mt68xx branch 2 times, most recently from 45a2b69 to 78dfd0f Compare November 25, 2024 15:24
@KevinOConnor
Copy link
Collaborator

Thanks. I'm fine with adding this.

I noticed a couple of minor things:

  • if a new ANGLE_CHIP_CALIBRATION command is added then it should be added to docs/G-Codes.md
  • I think ar100 wants sensor_adxl345.c, but doesn't care about sensor_angle.c. So, I think it would be best if we removed CONFIG_WANT_SENSORS and replaced it with CONFIG_WANT_THERMOCOUPLE, CONFIG_WANT_ADXL345, and CONFIG_WANT_ANGLE_SENSOR. I know this is a bit of a pain to change, but it should only involve modifying src/Makefile and src/Kconfig.

Cheers,
-Kevin

Signed-off-by: Timofey Titovets <[email protected]>
Signed-off-by: Timofey Titovets <[email protected]>
Signed-off-by: Timofey Titovets <[email protected]>
@KevinOConnor KevinOConnor merged commit 2b9e041 into Klipper3d:master Dec 12, 2024
1 check passed
@KevinOConnor
Copy link
Collaborator

Thanks!

-Kevin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants